package org.com.yz.dal.dao.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 子商户账户信息---资金明细表
 * </p>
 *
 * @author fjj123
 * @since 2018-06-14
 */
@TableName("his_accnt_mch_sub")
@Getter
@Setter
public class HisAccntMchSub extends Model<HisAccntMchSub> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @JSONField(name="id_mch_accnt")
    @TableId(value = "id_his_accnt_mch_sub", type = IdType.AUTO)
    private Integer idHisAccntMchSub;
    /**
     * 商户号
     */
    @JSONField(name="mch_no")
    @TableField("mch_no")
    private String mchNo;
    /**
     * 子商户号
     */
    @JSONField(name="mch_accnt_no")
    @TableField("mch_accnt_no")
    private String mchAccntNo;

    @JSONField(name="transactionNo")
    @TableField("transaction_no")
    private String transactionNo;

    @JSONField(name="orderNo")
    private String orderNo;
    /**
     * 事件名称
     */
    @JSONField(name="id_mch_accnt")
    private String event;
    /**
     * 时间发生金额
     */
    @JSONField(name="id_mch_accnt")
    @TableField("event_amt")
    private Long eventAmt;

    @JSONField(name="id_mch_accnt")
    @TableField("event_time")
    private Date eventTime;
    /**
     * 子商户账户资金余额---事件发生前
     */
    @JSONField(name="id_mch_accnt")
    @TableField("accnt_amt_before")
    private Long accntAmtBefore;
    /**
     * 子商户账户资金余额---事件发生后
     */
    @JSONField(name="id_mch_accnt")
    @TableField("accnt_amt_after")
    private Long accntAmtAfter;
    /**
     * 创建时间
     */
    @JSONField(name="id_mch_accnt")
    @TableField("create_time")
    private Date createTime;

    @JSONField(name="id_mch_accnt")
    @TableField("update_time")
    private Date updateTime;

    /**
     * 交易流水号
     */
    @JSONField(name="trans_no")
    private String transNo;

    /**
     * 业务类型
     */
    @JSONField(name="business_type")
    private String businessType;

    /**
     * 支付成功时间（支付通道返回）
     */
    @JSONField(name="trans_time")
    private String transTime;

    /**
     * 所属支付通道
     */
    @JSONField(name="trans_channel")
    private String transChannel;

    /**
     * 退款交易流水号
     */
    @JSONField(name="refund_trans_no")
    private String refundTransNo;


    /**
     * 结算周期
     */
    @JSONField(name="settle_duration")
    private String settleDuration;

    @Override
    protected Serializable pkVal() {
        return this.idHisAccntMchSub;
    }

    @Override
    public String toString() {
        return "HisAccntMchSub{" +
        "idHisAccntMchSub=" + idHisAccntMchSub +
        ", mchNo=" + mchNo +
        ", mch_accnt_no=" + mchAccntNo +
        ", transactionNo=" + transactionNo +
        ", event=" + event +
        ", eventAmt=" + eventAmt +
        ", eventTime=" + eventTime +
        ", accntAmtBefore=" + accntAmtBefore +
        ", accntAmtAfter=" + accntAmtAfter +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        "}";
    }
}
